//
//  AddNewAddressBottomCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/8/1.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "AddNewAddressBottomCell.h"

@implementation AddNewAddressBottomCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.textview = [[UITextView alloc] init];
        self.textview.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_textview];
        [_textview mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(0, scaleLeftAndRight(10), 0, 0));
        }];
        self.placeholderLabel = [[UILabel alloc] init];
        self.placeholderLabel.textAlignment = NSTextAlignmentLeft;
        _placeholderLabel.text = @"详细地址";
        self.placeholderLabel.textColor = [UIColor lightGrayColor];
        self.placeholderLabel.font = [UIFont systemFontOfSize:15];
        [self.textview addSubview:_placeholderLabel];
        [_placeholderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_textview.mas_left);
            make.top.equalTo(self.textview.mas_top).offset(scaleTopAndBottom(10));
            make.size.mas_equalTo(CGSizeMake(scaleLeftAndRight(100), scaleTopAndBottom(20)));
        }];
        
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
